Flash memory is a non-volatile storage chip that is electrically erasable and programmable. Negated AND (NAND) type flash memories exist in a wide range of portable storage devices, such as memory cards and USB drives. In recent years, the cost of NAND flash has dropped enough to make solid state drives (SSD) a viable option as primary storage devices for computer systems, often as a replacement for conventional hard disks.
Compared with traditional hard disks, flash/SSD devices (hereinafter, also generally referred to as an “SSD” device) have superior I/O performance. In addition, the cost of SSD devices has been continuously decreasing. These two factors make it increasingly popular to use SSD devices as a “second-level” cache which resides between the main memory (e.g., RAM) and a primary persistent storage such as a hard disk (as opposed to “first-level” or buffer cache which needs to utilize a portion of the main memory). Such a “second level” cache can be used by an operating system to cache “hot” I/O blocks (e.g., I/O blocks that may be frequently accessed) to improve I/O latency and throughput. Typically, such second-level caching involves a filter driver in the OS kernel I/O stack, which can intercept all I/Os, identify hot blocks, and dispatch I/Os to a cache or persistent storage.
In a virtualized environment, however, using a SSD device as a second-level cache brings up new challenges. For example, because a host computer system (e.g., a “host”) supports the running of multiple virtual machines (VMs) in a virtualization environment, the host computer system would need to manage the second-level cache on a per-VM basis and maintain VM-specific caching policies. In addition, VM live migration, also referred to as “VMotion,” is a technology that enables moving running VMs between different hosts without service interruption, and with complete transaction integrity. During VMotion, the hypervisor moves a VM's memory to the new host over a network connection (such as Ethernet) first, and then quickly suspends the VM on the original host an resumes it on the new host. It is often critical to keep the migration latency low in order to guarantee continuous service availability for VMotion. When a host uses an SSD device as a second-level cache, how to take advantage of the SSD cache during VMotion presents a challenging problem.